From: Eric W. Biederman Date: Wed, 11 May 2011 22:42:08 +0000 (-0700) Subject: ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry. X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~13855^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=62ca24baf1417e56fd2ae4ff07adfe7f6a2e42fc;p=linux-4.9.git ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry. Spotted-by: Nathan Lynch Signed-off-by: Eric W. Biederman --- diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index f18d6d58bf79..781dec5bd682 100644 --- a/fs/proc/namespaces.c +++ b/fs/proc/namespaces.c @@ -161,6 +161,7 @@ static struct dentry *proc_ns_dir_lookup(struct inode *dir, if (!memcmp(dentry->d_name.name, (*entry)->name, len)) break; } + error = ERR_PTR(-ENOENT); if (entry > last) goto out;